
export component ScrollNumWidget inherits Rectangle{
    background: blue;
    width: t1.width;
    height: t1.height;
    property <int> num:10;
    property <duration> time:300ms;
    property <bool> show1:true;
    property <bool> show2:true;
    t1:=Text {
        y: -t1.height;
        text: num;
        color: white;
        font-size: 40px;
//        visible: show1;
//        animate y {
//             easing: linear;
//             duration: time;
//        }
    }
    t2:=Text {
        text: num;
        color: white;
        font-size: 40px;
//        visible: show2;
//        animate y {
//             easing: linear;
//             duration: time;
//        }
    }
/*    t3:=Text {
        y: t3.height;
        text: num;
        font-size: 40px;
        animate y {
             easing: linear;
             duration: time;
        }
    }*/

    Timer {
        running: true;
        interval: time;
        triggered => {
            if(t1.y == 0px){
                t1.y = t1.height;
                t2.y = 0;
            }else{
                t2.y = t2.height;
                t1.y = 0;
            }

        }
    }
}

